package com.cloudbroker.openapi.manage.controller;

import static com.cloudbroker.bcs.platform.dav.common.util.RequestUtil.getSingleParameterMapForBody;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.cloudbroker.bcs.common.entity.HSBCPSBackVO;
import com.cloudbroker.bcs.common.util.VOUtil;
import com.cloudbroker.bcs.platform.dav.bizapi.service.business.plugs.result.ExtendAppBuyedListResult;
import com.cloudbroker.bcs.platform.dav.bizapi.service.business.plugs.vo.ExtendAppBuyForm;
import com.cloudbroker.bcs.platform.dav.bizapi.service.business.plugs.vo.ExtendAppBuyedListForm;
import com.cloudbroker.bcs.platform.dav.bizapi.t2service.business.ExtendAppT2BizService;
import com.cloudbroker.bcs.platform.dav.common.ext.annotation.SaveLog;

@Controller
public class ExtendAppController {

	@Resource
	private ExtendAppT2BizService extendAppT2;
	
	
/*	@ResponseBody
	@RequestMapping("func_extendapp_setting")
	@SaveLog(remark = "个性化配置")
	public HSBCPSBackVO funcExtendAppSetting(HttpServletRequest request,String jsonpcallback){
		ExtendAppForm form = getSingleParameterMapForBody(request, ExtendAppForm.class);
		return VOUtil.setJsonpResult(extendAppT2.funcExtendAppSetting(form), jsonpcallback);
	}*/
	
	@ResponseBody
	@RequestMapping("func_extendapp_buy")
	@SaveLog(remark = "组件购买")
	public HSBCPSBackVO funcExtendAppBuy(HttpServletRequest request,String jsonpcallback){
		ExtendAppBuyForm form = getSingleParameterMapForBody(request, ExtendAppBuyForm.class);
		return VOUtil.setJsonpResult(extendAppT2.funcExtendAppBuy(form), jsonpcallback);
	}
	
	@ResponseBody
	@RequestMapping("func_extendapp_buyed_list")
	@SaveLog(remark = "已购列表")
	public ExtendAppBuyedListResult funcExtendAppBuyedList(HttpServletRequest request,String jsonpcallback){
		ExtendAppBuyedListForm form = getSingleParameterMapForBody(request, ExtendAppBuyedListForm.class);
		return VOUtil.setJsonpResult(extendAppT2.funcExtendAppBuyedList(form), jsonpcallback);
	}
	
	
}
